home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / lrpad / padfrm.frm < prev   
Text File  |  1995-05-01  |  4KB  |  141 lines

  1. VERSION 2.00
  2. Begin Form PadFrm 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "Pad Examples"
  5.    ClientHeight    =   2265
  6.    ClientLeft      =   1830
  7.    ClientTop       =   1725
  8.    ClientWidth     =   4830
  9.    Height          =   2670
  10.    Left            =   1770
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   2265
  13.    ScaleWidth      =   4830
  14.    Top             =   1380
  15.    Width           =   4950
  16.    Begin CommandButton ExitBtn 
  17.       Caption         =   "Exit"
  18.       Height          =   315
  19.       Left            =   3030
  20.       TabIndex        =   6
  21.       Top             =   1740
  22.       Width           =   1245
  23.    End
  24.    Begin TextBox Text8 
  25.       ForeColor       =   &H00FF0000&
  26.       Height          =   285
  27.       Left            =   1860
  28.       TabIndex        =   3
  29.       TabStop         =   0   'False
  30.       Top             =   1290
  31.       Width           =   2595
  32.    End
  33.    Begin TextBox Text7 
  34.       BackColor       =   &H00C0C0C0&
  35.       BorderStyle     =   0  'None
  36.       Height          =   225
  37.       Left            =   1110
  38.       MousePointer    =   1  'Arrow
  39.       TabIndex        =   10
  40.       TabStop         =   0   'False
  41.       Text            =   "Result :"
  42.       Top             =   1350
  43.       Width           =   765
  44.    End
  45.    Begin TextBox Text6 
  46.       Height          =   285
  47.       Left            =   1860
  48.       TabIndex        =   2
  49.       Top             =   930
  50.       Width           =   705
  51.    End
  52.    Begin TextBox Text5 
  53.       BackColor       =   &H00C0C0C0&
  54.       BorderStyle     =   0  'None
  55.       Height          =   225
  56.       Left            =   780
  57.       MousePointer    =   1  'Arrow
  58.       TabIndex        =   9
  59.       TabStop         =   0   'False
  60.       Text            =   "Fill Length :"
  61.       Top             =   960
  62.       Width           =   1095
  63.    End
  64.    Begin CommandButton RPADBtn 
  65.       Caption         =   "RPAD"
  66.       Height          =   315
  67.       Left            =   1740
  68.       TabIndex        =   5
  69.       Top             =   1740
  70.       Width           =   1245
  71.    End
  72.    Begin CommandButton LPADBtn 
  73.       Caption         =   "LPAD"
  74.       Height          =   315
  75.       Left            =   450
  76.       TabIndex        =   4
  77.       Top             =   1740
  78.       Width           =   1245
  79.    End
  80.    Begin TextBox Text4 
  81.       Height          =   285
  82.       Left            =   1860
  83.       MaxLength       =   1
  84.       TabIndex        =   1
  85.       Top             =   570
  86.       Width           =   705
  87.    End
  88.    Begin TextBox Text3 
  89.       BackColor       =   &H00C0C0C0&
  90.       BorderStyle     =   0  'None
  91.       Height          =   225
  92.       Left            =   570
  93.       MousePointer    =   1  'Arrow
  94.       TabIndex        =   8
  95.       TabStop         =   0   'False
  96.       Text            =   "Fill Character :"
  97.       Top             =   630
  98.       Width           =   1335
  99.    End
  100.    Begin TextBox Text1 
  101.       Height          =   285
  102.       Left            =   1860
  103.       TabIndex        =   0
  104.       Top             =   210
  105.       Width           =   2595
  106.    End
  107.    Begin TextBox Text2 
  108.       BackColor       =   &H00C0C0C0&
  109.       BorderStyle     =   0  'None
  110.       Height          =   225
  111.       Left            =   300
  112.       MousePointer    =   1  'Arrow
  113.       TabIndex        =   7
  114.       TabStop         =   0   'False
  115.       Text            =   "Beginning String :"
  116.       Top             =   240
  117.       Width           =   1605
  118.    End
  119. End
  120.  
  121. Sub ExitBtn_Click ()
  122. End
  123. End Sub
  124.  
  125. Sub LPADBtn_Click ()
  126. String1 = Text1.Text
  127. Char1 = Text4.Text
  128. Length% = Text6.Text
  129. x = LPAD(String1, Char1, Length%)
  130. Text8.Text = Result
  131. End Sub
  132.  
  133. Sub RPADBtn_Click ()
  134. String1 = Text1.Text
  135. Char1 = Text4.Text
  136. Length% = Text6.Text
  137. x = RPAD(String1, Char1, Length%)
  138. Text8.Text = Result
  139. End Sub
  140.  
  141.